<!DOCTYPE html>
<script>
  if (window.testRunner)
      testRunner.setPrinting();
  if (window.internals)
      internals.settings.setShouldPrintBackgrounds(true);
</script>
<div style="width: 200px; height: 200px; background: yellow; overflow: auto">
  <div style="width: 400px; height: 500px"></div>
</div>
<div style="height: 300px; background: green"></div>
